package com.zsp.coupon.config;


import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.text.SimpleDateFormat;


/**
 * jackson的自定义配置
 */
@Configuration
public class JackSonConfig {

    @Bean
    public ObjectMapper getObjectMapper(){
                ObjectMapper mapper=new ObjectMapper();
                mapper.setDateFormat( new SimpleDateFormat(
                        "yyyy-MM-dd HH:mm:ss"));
                return mapper;
    }

}
